package com.ge.modules.entity;

import com.ge.modules.api.apiDTO.TbCollectDto;

import java.io.Serializable;
import java.util.Date;



/**
 * 用户收藏表
 * 
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-17 15:12:57
 */
public class TbCollectEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//
	private Integer id;
	//收藏者id
	private Integer userIdMaster;
	//被收藏id
	private Integer collectIdSlave;
	//收藏类型 1店铺 2帖子
	private Integer collectType;
	//创建时间
	private Date createTime;

	/**
	 * 设置：
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：收藏者id
	 */
	public void setUserIdMaster(Integer userIdMaster) {
		this.userIdMaster = userIdMaster;
	}
	/**
	 * 获取：收藏者id
	 */
	public Integer getUserIdMaster() {
		return userIdMaster;
	}
	/**
	 * 设置：被收藏id
	 */
	public void setCollectIdSlave(Integer collectIdSlave) {
		this.collectIdSlave = collectIdSlave;
	}
	/**
	 * 获取：被收藏id
	 */
	public Integer getCollectIdSlave() {
		return collectIdSlave;
	}

	public void setCollectType(Integer collectType) {
		this.collectType = collectType;
	}

	public Integer getCollectType() {
		return collectType;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}

	public TbCollectDto toDto(){
		TbCollectDto tbCollectDto = new TbCollectDto();
		tbCollectDto.setCollectIdSlave(this.getCollectIdSlave());
		tbCollectDto.setId(this.getId());
		tbCollectDto.setUserIdMaster(this.getUserIdMaster());
		tbCollectDto.setCollectType(this.getCollectType());
		tbCollectDto.setCreateTime(this.getCreateTime());
		return tbCollectDto;
	}
}
